
const Router = require('koa-router');
const router = new Router();
const uuid = require('uuid');

import Search from '../../model/searchTest';

router.get('/addSearchItem', async (ctx: any) => {
    console.log('asdasdasdasd')
    const { name, tag, icon } = ctx.query;
    Search.create({
        name: name,
        tag: tag,
        icon: icon,
        searchId: uuid.v4()
    })
});

export const search = router.routes();
